package com.java.manage.controller;

import com.java.common.model.Result;
import com.java.manage.model.Maintain;
import com.java.manage.model.MaintainAcc;
import com.java.manage.service.MaintainAccService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/maintainAcc")
public class MaintainAccController {

    @Autowired
    private MaintainAccService maintainAccService;

    @PostMapping("/list")
    public Result list(@RequestBody MaintainAcc maintainAcc){
        return maintainAccService.list(maintainAcc);
    }

    @PostMapping("/save")
    public Result save(@RequestBody MaintainAcc maintainAcc) {
        return maintainAccService.save(maintainAcc);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody MaintainAcc maintainAcc) {
        return maintainAccService.modify(maintainAcc);
    }

    @PostMapping("/getGenerate")
    public Result getGenerate(@RequestBody List<MaintainAcc> maintainAcc) {
        return maintainAccService.getGenerate(maintainAcc);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return maintainAccService.remove(ids);
    }


}
